<template>
	<view class="container">
		<view class="content">
			<view class="asset-row">
				<view class="asset-item">
					<text class="label">Tx通证</text>
					<text class="value">{{5.00}}</text>
				</view>
				<view class="asset-item">
					<text class="label">乐豆</text>
					<text class="value">{{1.00}}</text>
				</view>
				<view class="asset-item">
					<text class="label">当前价格</text>
					<text class="value">{{1}}</text>
				</view>
			</view>
		</view>
		<!-- 操作按钮组 -->
		<view class="action-buttons">
			<view class="action-btn" @click="onout">
				<image src="@/static/blind/out.png"></image>
				<view>otc</view>
			</view>
			<view class="action-btn" @click="onyun">
				<image src="@/static/blind/yunsl.png"></image>
				<view>云算力</view>
			</view>
		</view>
		<view class="action-btn" @click="onbuy">
			<image src="@/static/blind/jiaoyi.png"></image>
			<view>购买</view>
		</view>
	</view>

	<!-- 空状态提示 -->
	<view class="empty-state">
		<span>暂无乐豆记录哦~</span>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				walletAddress: 'Ixwbce8dbebd45bb6a12',
			}
		},
		mounted() {},
		methods: {
			copyAddress() {
				navigator.clipboard.writeText(this.walletAddress)
					.then(() => this.$message.success('复制成功'))
					.catch(() => this.$message.error('复制失败'));
			},
			onout: function() {
				uni.navigateTo({
					url: "/pages/blind/out"
				})
			},
			onyun: function() {
				uni.navigateTo({
					url: "/pages/recreation/index"
				})
			},
			onbuy: function() {

			},
		}
	}
</script>

<style scoped lang="scss">
	.container {
		width: 100%;
	}

	.content {
		width: 100%;
		height: 140px;
		padding: 20px;
		padding-top: 30px;
		background-color: #e73224;
		background-repeat: no-repeat;
		background-size: 100%;
	}

	.body-tab {
		z-index: 999;
		width: 92%;
		margin: 0 auto;
		background-color: #FFFFFF;
		border-top-right-radius: 10px;
		border-top-left-radius: 10px;
		border: 1px solid lavender;
		position: relative;
		top: -20px;
	}

	/* 顶部资产行 */
	.asset-row {
		display: flex;
		justify-content: space-between;
		margin-bottom: 30px;

		.asset-item {
			flex: 1;
			text-align: center;
			color: #fff;

			.label {
				display: block;
				font-size: 13px;
				margin-bottom: 5px;
			}

			.value {
				font-size: 18px;
				color: #f79b6d;
				font-weight: bold;
			}
		}
	}

	.statics {
		width: 90%;
		background-color: #fff;
		border-radius: 10px;
	}

	.price {
		font-size: 28rpx;
		color: #fbffff;
	}

	.tab-item.active::after {
		content: '';
		position: absolute;
		bottom: 0;
		left: 50%;
		transform: translateX(-50%);
		width: 40px;
		height: 2px;
		background: #e73224;
		/* 将白色改为红色 */
		border-radius: 3rpx;
	}

	.action-buttons {
		display: flex;
		gap: 20px;
		justify-content: center;
		margin: 20px 0;
	}

	.action-btn {
		text-align: center;
		width: 33%;

		image {
			width: 35px;
			height: 35px;
		}

		view {
			font-size: 14px;
		}
	}

	.empty-state {
		text-align: center;
		color: #909399;
		padding: 20px;
	}
</style>
